﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Media;
using System.Collections;
using System.Threading;

/* Authors: Mike Poddo, Matt Gillette
 * Missile Command
 */

namespace MissileCommand
{
    class CitiesBoom
    {
        private Graphics g;
        private PointF endPoint;
        //private ArrayList offShots;

        public CitiesBoom(Graphics g, PointF end)
        {
            this.g = g;
            this.endPoint = end;
        }


        public void drawBoom()
        {   
            RectangleF r;
            SolidBrush mybrush = new SolidBrush(Color.Blue);
            /*
            g.FillEllipse(mybrush, endPoint.X - 2, endPoint.Y - 2, 5, 5);
            Thread.Sleep(50);
            mybrush.Color = Color.Blue;
            g.FillEllipse(mybrush, endPoint.X - 5, endPoint.Y - 5, 10, 10);
            Thread.Sleep(50);
            mybrush.Color = Color.Red;
            g.FillEllipse(mybrush, endPoint.X - 7, endPoint.Y - 7, 15, 15);
            Thread.Sleep(50);
            mybrush.Color = Color.Red;
            g.FillEllipse(mybrush, endPoint.X - 10, endPoint.Y - 10, 20, 20);
            Thread.Sleep(50);
            mybrush.Color = Color.Orange;
            g.FillEllipse(mybrush, endPoint.X - 12, endPoint.Y - 12, 25, 25);
            Thread.Sleep(50);
            mybrush.Color = Color.Orange;
            g.FillEllipse(mybrush, endPoint.X - 15, endPoint.Y - 15, 30, 30);
            Thread.Sleep(50);
            mybrush.Color = Color.Yellow;
            g.FillEllipse(mybrush, endPoint.X - 17, endPoint.Y - 17, 35, 35);
            Thread.Sleep(50);
            */
            mybrush.Color = Color.Red;
            g.FillEllipse(mybrush, endPoint.X - 20, endPoint.Y - 20, 40, 40);
            Thread.Sleep(100);
            mybrush.Color = Color.Black;
            g.FillEllipse(mybrush, endPoint.X - 22, endPoint.Y - 22, 45, 45);
            mybrush.Color = Color.Transparent;
            r = new RectangleF(endPoint.X - 22, endPoint.Y - 22, 40, 40);
            g.FillRectangle(mybrush, r);
            g.Dispose();
        }



    }
}
